home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / misc1 / iv26_w30.zip / INTERVIE / FTABLE.H < prev    next >
C/C++ Source or Header  |  1992-03-25  |  852b  |  43 lines

  1. /*
  2.  * Object association table.
  3.  */
  4.  
  5. #ifndef FontTable_h
  6. #define FontTable_h
  7.  
  8. #include <InterViews\table.h>
  9.  
  10. class FontTableEntry;
  11. class StringId;
  12. class FontRep;
  13.  
  14. class FontTable : public Table {
  15. public:
  16.     FontTable(int);
  17.     void Insert(class StringId*, class FontRep*);
  18.     boolean Find(class FontRep*&, class StringId*);
  19.     void Remove(class StringId*);
  20. };
  21.  
  22. inline FontTable::FontTable (int n) : Table (n) {}
  23.  
  24. inline void FontTable::Insert (class StringId* k, class FontRep* v) {
  25.     Table::Insert((void*)k, (void*)v);
  26. }
  27.  
  28. inline boolean FontTable::Find (class FontRep*& v, class StringId* k) {
  29.     void* vv;
  30.  
  31.     boolean b = Table::Find(vv, (void*)k);
  32.     if (b) {
  33.     v = (class FontRep*)vv;
  34.     }
  35.     return b;
  36. }
  37.  
  38. inline void FontTable::Remove (class StringId* k) {
  39.     Table::Remove((void*)k);
  40. }
  41.  
  42. #endif
  43.